package com.sunny.ihealth.utils;

import android.content.Context;

/**
 * 屏幕相关
 * Created by Sunny  An on 2016/6/11.
 */
public class ScreenUtils {

    /**
     * dp to px
     */
    public static int dp2px(Context context, float dpValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
}
